<?
require("config.php");

$location_status .= "| Add";
$show_backnav = "menu";
$menutype = 2;

if (NULL!=$action){

   $field = array(
	"code",
	"name",
	"status",
	"publish_date",
	"details",
	"order_index",
	"site_title",
	"site_description",
	"site_keywords",
	"type",
	);


   $content = array(
	$Code,
	$Name,
	$Status,
	"$myYear-$myMonth-$myDay",
	$Details,
	$Order_index,

	$Site_title,
	$Site_description,
	$Site_keywords,
	$type,
	);

   myInsert($table,$field,$content);


   header("location:" . $rela_path . "share/msg.php?v=701");

   exit();

}

if (checkCode($table,$Code)){

	header("location:" . $rela_path . "share/msg.php?v=9001");
	exit();
}


require($rela_path . "inc/header.php");
require($rela_path . "bin/date.php");
?> 
<form name="form1" method="post" action="">
<!--hidden filed-->
<input name="action" type="hidden" value="add">
<input name="Code" type="hidden" value="<?print($Code)?>">

  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right"> <input name="image" type="image" onclick="Redirect('menu.php',1);return false;" src="../../images/bt_cancel.gif" width="78" height="23"> 
        <input name="image" type="image" src="../../images/bt_save.gif" width="76" height="22"  <?print($active)?>> 
      </td>
    </tr>
  </table>
  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right">&nbsp; </td>
    </tr>
    <tr> 
      <td><table border="0">
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td class="tdheader">Code :</td>
            <td><?print($Code)?></td>
          </tr>

          <tr> 
            <td class="tdheader">Order : </td>
            <td><input type="text" class="text" name="Order_index" size="12" value="<?print($Order_index)?>"></td>
          </tr>
          <tr> 
            <td class="tdheader">Name :</td>
            <td> <textarea class="text" name="Name" cols="60" rows="3"></textarea> 
            </td>
          </tr>
					<tr> 
            <td class="tdheader">Type :</td>
            <td>
			<select name="type" class="select">
			<option value="1">Evening Seminars</option>
			<option value="2">Training Courses</option>
			<option value="3">Training Programs</option>
			<option value="4">In-house Training</option>
			</select>
			</td>
          </tr>

          <tr> 
            <td valign="top" class="tdheader">Publish :</td>
            <td> 
			
              <?

$sourceData = array(
  "Yes",
  "No",
  );

$boxName="Status";

$value=$Status;

FFPCheckBox("Status",$Status,$sourceData,$sourceLabel);

?>
            </td> 			  
          </tr>			  
          <tr> 
                  <td class="tdheader">Publishing Date :</td>
                  <td><?print(FFPtime(date("Y-m-d H:i")))?></td>
                </tr>

          <tr> 
            <td class="tdheader">Details :</td>
            <td> <textarea class="text" name="Details" cols="60" rows="30"></textarea> 
            </td>
          </tr>




          <tr> 
            <td class="tdheader">Site Title :</td>
            <td> <input type="text" class="text" name="Site_title" size="60" value="<?print($Site_title)?>">
            </td>
          </tr>

          <tr> 
            <td class="tdheader">Site Description :</td>
            <td> <textarea class="text" name="Site_description" cols="60" rows="6"><?print($Site_description)?></textarea> 
            </td>
          </tr>


          <tr> 
            <td class="tdheader">Site keywords :</td>
            <td> <textarea class="text" name="Site_keywords" cols="60" rows="6"><?print($Site_keywords)?></textarea> 
            </td>
          </tr>








          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  <table width="95%" border="0" align="center">
    <tr> 
      <td align="right"> <input name="image2" type="image" onclick="Redirect('menu.php',1);return false;" src="../../images/bt_cancel.gif" width="78" height="23"> 
        <input name="image2" type="image" src="../../images/bt_save.gif" width="76" height="22" <?print($active)?>> 
      </td>
    </tr>
  </table>
</form>
<?
require($rela_path . "inc/footer.php");
?>

